package com.ebolib.base;

import android.content.Intent;

import com.ebo.commonlib.utils.I_Share;
import com.ebo.corelib.ui.TakePhotoActivity;
import com.ebo.corelib.ui.mvp.BasePresenter;
import com.ebolib.net.OutDateEvent;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;



/**
 * Created by admin on 2018/3/27.
 */

public abstract class MyTakePhotoActivity<P extends BasePresenter> extends TakePhotoActivity<P> {


    @Override
    protected void onResume() {
        super.onResume();
        EventBus.getDefault().register(this);
    }


    @Override
    protected void onPause() {
        super.onPause();
        EventBus.getDefault().unregister(this);
    }


    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onOutDate(OutDateEvent event) {
        I_Share.setIsLogin(false);
        Intent intent = new Intent();
//        intent.setClass(this, LoginActivity.class);
        intent.putExtra("drawback", true);
        startActivity(intent);
    }


}
